// Generated from BitQ.g4 by ANTLR 4.7.2

	package com.xuanyue.db.xuan.antlr;

import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.misc.*;
import org.antlr.v4.runtime.tree.*;
import java.util.List;
import java.util.Iterator;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class BitQParser extends Parser {
	static { RuntimeMetaData.checkVersion("4.7.2", RuntimeMetaData.VERSION); }

	protected static final DFA[] _decisionToDFA;
	protected static final PredictionContextCache _sharedContextCache =
		new PredictionContextCache();
	public static final int
		T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, TransArrt=9, 
		NULL=10, INSERT=11, INTO=12, VALUES=13, SAVE=14, AS=15, MIX=16, DESC=17, 
		ASC=18, Phone_seach=19, PositionMatch=20, Contains=21, Has_Every_Char=22, 
		SELECT=23, FROM=24, WHERE=25, ON=26, LEFT=27, RIGHT=28, JOIN=29, AND=30, 
		OR=31, NOT=32, TO_DATE=33, ExprNot=34, COMMA=35, SEMI=36, LIMIT=37, Order=38, 
		By=39, NAME=40, DOT=41, Brackets_L=42, Brackets_R=43, STRING=44, NUM=45, 
		TRUE=46, FALSE=47, WS=48, SQL_COMMENT=49;
	public static final int
		RULE_query = 0, RULE_addR = 1, RULE_fields = 2, RULE_expr = 3, RULE_repo = 4, 
		RULE_saveAsFile = 5, RULE_tablePart = 6, RULE_tjoinPart = 7, RULE_orCondition = 8, 
		RULE_andCondition = 9, RULE_conditionElement = 10, RULE_groupCondition = 11, 
		RULE_conditionExpr = 12, RULE_values = 13, RULE_to_date = 14, RULE_result = 15, 
		RULE_fullName = 16, RULE_boolTF = 17, RULE_orNot = 18, RULE_andNot = 19, 
		RULE_phone_seach = 20, RULE_sortE = 21, RULE_sortBy = 22, RULE_limit = 23, 
		RULE_mix = 24;
	private static String[] makeRuleNames() {
		return new String[] {
			"query", "addR", "fields", "expr", "repo", "saveAsFile", "tablePart", 
			"tjoinPart", "orCondition", "andCondition", "conditionElement", "groupCondition", 
			"conditionExpr", "values", "to_date", "result", "fullName", "boolTF", 
			"orNot", "andNot", "phone_seach", "sortE", "sortBy", "limit", "mix"
		};
	}
	public static final String[] ruleNames = makeRuleNames();

	private static String[] makeLiteralNames() {
		return new String[] {
			null, "'='", "'!='", "'>='", "'>'", "'<='", "'<'", "'['", "']'", null, 
			null, null, null, null, null, null, null, null, null, null, null, null, 
			null, null, null, null, null, null, null, null, null, null, null, null, 
			"'!'", "','", "';'", null, null, null, null, "'.'", "'('", "')'"
		};
	}
	private static final String[] _LITERAL_NAMES = makeLiteralNames();
	private static String[] makeSymbolicNames() {
		return new String[] {
			null, null, null, null, null, null, null, null, null, "TransArrt", "NULL", 
			"INSERT", "INTO", "VALUES", "SAVE", "AS", "MIX", "DESC", "ASC", "Phone_seach", 
			"PositionMatch", "Contains", "Has_Every_Char", "SELECT", "FROM", "WHERE", 
			"ON", "LEFT", "RIGHT", "JOIN", "AND", "OR", "NOT", "TO_DATE", "ExprNot", 
			"COMMA", "SEMI", "LIMIT", "Order", "By", "NAME", "DOT", "Brackets_L", 
			"Brackets_R", "STRING", "NUM", "TRUE", "FALSE", "WS", "SQL_COMMENT"
		};
	}
	private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
	public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);

	/**
	 * @deprecated Use {@link #VOCABULARY} instead.
	 */
	@Deprecated
	public static final String[] tokenNames;
	static {
		tokenNames = new String[_SYMBOLIC_NAMES.length];
		for (int i = 0; i < tokenNames.length; i++) {
			tokenNames[i] = VOCABULARY.getLiteralName(i);
			if (tokenNames[i] == null) {
				tokenNames[i] = VOCABULARY.getSymbolicName(i);
			}

			if (tokenNames[i] == null) {
				tokenNames[i] = "<INVALID>";
			}
		}
	}

	@Override
	@Deprecated
	public String[] getTokenNames() {
		return tokenNames;
	}

	@Override

	public Vocabulary getVocabulary() {
		return VOCABULARY;
	}

	@Override
	public String getGrammarFileName() { return "BitQ.g4"; }

	@Override
	public String[] getRuleNames() { return ruleNames; }

	@Override
	public String getSerializedATN() { return _serializedATN; }

	@Override
	public ATN getATN() { return _ATN; }


	@Override
	public Token match(int ttype) throws RecognitionException {
		Token t = getCurrentToken();
		if ( t.getType()==ttype ) {
			if ( ttype==Token.EOF ) {
				matchedEOF = true;
			}
			_errHandler.reportMatch(this);
			consume();
			return t;
		}
		else {
			throw new RuntimeException("miss "+ _SYMBOLIC_NAMES[ttype]);
		}
		
	}

	public BitQParser(TokenStream input) {
		super(input);
		_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
	}

	public static class QueryContext extends ParserRuleContext {
		public ExprContext expr() {
			return getRuleContext(ExprContext.class,0);
		}
		public AddRContext addR() {
			return getRuleContext(AddRContext.class,0);
		}
		public QueryContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_query; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterQuery(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitQuery(this);
		}
	}

	public final QueryContext query() throws RecognitionException {
		QueryContext _localctx = new QueryContext(_ctx, getState());
		enterRule(_localctx, 0, RULE_query);
		try {
			setState(52);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case SELECT:
				enterOuterAlt(_localctx, 1);
				{
				setState(50);
				expr();
				}
				break;
			case INSERT:
				enterOuterAlt(_localctx, 2);
				{
				setState(51);
				addR();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AddRContext extends ParserRuleContext {
		public TerminalNode INSERT() { return getToken(BitQParser.INSERT, 0); }
		public TerminalNode INTO() { return getToken(BitQParser.INTO, 0); }
		public FullNameContext fullName() {
			return getRuleContext(FullNameContext.class,0);
		}
		public TerminalNode VALUES() { return getToken(BitQParser.VALUES, 0); }
		public TerminalNode Brackets_L() { return getToken(BitQParser.Brackets_L, 0); }
		public List<ValuesContext> values() {
			return getRuleContexts(ValuesContext.class);
		}
		public ValuesContext values(int i) {
			return getRuleContext(ValuesContext.class,i);
		}
		public TerminalNode Brackets_R() { return getToken(BitQParser.Brackets_R, 0); }
		public FieldsContext fields() {
			return getRuleContext(FieldsContext.class,0);
		}
		public List<TerminalNode> COMMA() { return getTokens(BitQParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(BitQParser.COMMA, i);
		}
		public AddRContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_addR; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterAddR(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitAddR(this);
		}
	}

	public final AddRContext addR() throws RecognitionException {
		AddRContext _localctx = new AddRContext(_ctx, getState());
		enterRule(_localctx, 2, RULE_addR);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(54);
			match(INSERT);
			setState(55);
			match(INTO);
			setState(56);
			fullName();
			setState(58);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==Brackets_L) {
				{
				setState(57);
				fields();
				}
			}

			setState(60);
			match(VALUES);
			setState(61);
			match(Brackets_L);
			setState(62);
			values();
			setState(67);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(63);
				match(COMMA);
				setState(64);
				values();
				}
				}
				setState(69);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(70);
			match(Brackets_R);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class FieldsContext extends ParserRuleContext {
		public TerminalNode Brackets_L() { return getToken(BitQParser.Brackets_L, 0); }
		public List<FullNameContext> fullName() {
			return getRuleContexts(FullNameContext.class);
		}
		public FullNameContext fullName(int i) {
			return getRuleContext(FullNameContext.class,i);
		}
		public TerminalNode Brackets_R() { return getToken(BitQParser.Brackets_R, 0); }
		public List<TerminalNode> COMMA() { return getTokens(BitQParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(BitQParser.COMMA, i);
		}
		public FieldsContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_fields; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterFields(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitFields(this);
		}
	}

	public final FieldsContext fields() throws RecognitionException {
		FieldsContext _localctx = new FieldsContext(_ctx, getState());
		enterRule(_localctx, 4, RULE_fields);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(72);
			match(Brackets_L);
			setState(73);
			fullName();
			setState(78);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(74);
				match(COMMA);
				setState(75);
				fullName();
				}
				}
				setState(80);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			setState(81);
			match(Brackets_R);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ExprContext extends ParserRuleContext {
		public TerminalNode SELECT() { return getToken(BitQParser.SELECT, 0); }
		public ResultContext result() {
			return getRuleContext(ResultContext.class,0);
		}
		public TerminalNode FROM() { return getToken(BitQParser.FROM, 0); }
		public RepoContext repo() {
			return getRuleContext(RepoContext.class,0);
		}
		public TerminalNode WHERE() { return getToken(BitQParser.WHERE, 0); }
		public OrConditionContext orCondition() {
			return getRuleContext(OrConditionContext.class,0);
		}
		public SortByContext sortBy() {
			return getRuleContext(SortByContext.class,0);
		}
		public MixContext mix() {
			return getRuleContext(MixContext.class,0);
		}
		public LimitContext limit() {
			return getRuleContext(LimitContext.class,0);
		}
		public SaveAsFileContext saveAsFile() {
			return getRuleContext(SaveAsFileContext.class,0);
		}
		public TerminalNode SEMI() { return getToken(BitQParser.SEMI, 0); }
		public ExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_expr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitExpr(this);
		}
	}

	public final ExprContext expr() throws RecognitionException {
		ExprContext _localctx = new ExprContext(_ctx, getState());
		enterRule(_localctx, 6, RULE_expr);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(83);
			match(SELECT);
			setState(84);
			result();
			setState(85);
			match(FROM);
			setState(86);
			repo();
			setState(89);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==WHERE) {
				{
				setState(87);
				match(WHERE);
				setState(88);
				orCondition();
				}
			}

			setState(92);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==Order) {
				{
				setState(91);
				sortBy();
				}
			}

			setState(95);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==MIX) {
				{
				setState(94);
				mix();
				}
			}

			setState(98);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==LIMIT) {
				{
				setState(97);
				limit();
				}
			}

			setState(101);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==SAVE) {
				{
				setState(100);
				saveAsFile();
				}
			}

			setState(104);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==SEMI) {
				{
				setState(103);
				match(SEMI);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class RepoContext extends ParserRuleContext {
		public List<FullNameContext> fullName() {
			return getRuleContexts(FullNameContext.class);
		}
		public FullNameContext fullName(int i) {
			return getRuleContext(FullNameContext.class,i);
		}
		public List<TerminalNode> COMMA() { return getTokens(BitQParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(BitQParser.COMMA, i);
		}
		public RepoContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_repo; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterRepo(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitRepo(this);
		}
	}

	public final RepoContext repo() throws RecognitionException {
		RepoContext _localctx = new RepoContext(_ctx, getState());
		enterRule(_localctx, 8, RULE_repo);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(106);
			fullName();
			setState(111);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(107);
				match(COMMA);
				setState(108);
				fullName();
				}
				}
				setState(113);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class SaveAsFileContext extends ParserRuleContext {
		public TerminalNode SAVE() { return getToken(BitQParser.SAVE, 0); }
		public TerminalNode AS() { return getToken(BitQParser.AS, 0); }
		public TerminalNode STRING() { return getToken(BitQParser.STRING, 0); }
		public SaveAsFileContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_saveAsFile; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterSaveAsFile(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitSaveAsFile(this);
		}
	}

	public final SaveAsFileContext saveAsFile() throws RecognitionException {
		SaveAsFileContext _localctx = new SaveAsFileContext(_ctx, getState());
		enterRule(_localctx, 10, RULE_saveAsFile);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(114);
			match(SAVE);
			setState(115);
			match(AS);
			setState(116);
			match(STRING);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class TablePartContext extends ParserRuleContext {
		public TjoinPartContext tjoinPart() {
			return getRuleContext(TjoinPartContext.class,0);
		}
		public FullNameContext fullName() {
			return getRuleContext(FullNameContext.class,0);
		}
		public TablePartContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_tablePart; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterTablePart(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitTablePart(this);
		}
	}

	public final TablePartContext tablePart() throws RecognitionException {
		TablePartContext _localctx = new TablePartContext(_ctx, getState());
		enterRule(_localctx, 12, RULE_tablePart);
		try {
			setState(120);
			_errHandler.sync(this);
			switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) {
			case 1:
				enterOuterAlt(_localctx, 1);
				{
				setState(118);
				tjoinPart();
				}
				break;
			case 2:
				enterOuterAlt(_localctx, 2);
				{
				setState(119);
				fullName();
				}
				break;
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class TjoinPartContext extends ParserRuleContext {
		public List<FullNameContext> fullName() {
			return getRuleContexts(FullNameContext.class);
		}
		public FullNameContext fullName(int i) {
			return getRuleContext(FullNameContext.class,i);
		}
		public List<TerminalNode> JOIN() { return getTokens(BitQParser.JOIN); }
		public TerminalNode JOIN(int i) {
			return getToken(BitQParser.JOIN, i);
		}
		public List<TerminalNode> ON() { return getTokens(BitQParser.ON); }
		public TerminalNode ON(int i) {
			return getToken(BitQParser.ON, i);
		}
		public List<OrConditionContext> orCondition() {
			return getRuleContexts(OrConditionContext.class);
		}
		public OrConditionContext orCondition(int i) {
			return getRuleContext(OrConditionContext.class,i);
		}
		public List<TerminalNode> LEFT() { return getTokens(BitQParser.LEFT); }
		public TerminalNode LEFT(int i) {
			return getToken(BitQParser.LEFT, i);
		}
		public List<TerminalNode> RIGHT() { return getTokens(BitQParser.RIGHT); }
		public TerminalNode RIGHT(int i) {
			return getToken(BitQParser.RIGHT, i);
		}
		public TjoinPartContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_tjoinPart; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterTjoinPart(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitTjoinPart(this);
		}
	}

	public final TjoinPartContext tjoinPart() throws RecognitionException {
		TjoinPartContext _localctx = new TjoinPartContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_tjoinPart);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(122);
			fullName();
			setState(131);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==LEFT || _la==RIGHT) {
				{
				{
				setState(123);
				_la = _input.LA(1);
				if ( !(_la==LEFT || _la==RIGHT) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(124);
				match(JOIN);
				setState(125);
				fullName();
				setState(126);
				match(ON);
				setState(127);
				orCondition();
				}
				}
				setState(133);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class OrConditionContext extends ParserRuleContext {
		public OrNotContext operator;
		public List<AndConditionContext> andCondition() {
			return getRuleContexts(AndConditionContext.class);
		}
		public AndConditionContext andCondition(int i) {
			return getRuleContext(AndConditionContext.class,i);
		}
		public TerminalNode NOT() { return getToken(BitQParser.NOT, 0); }
		public List<OrNotContext> orNot() {
			return getRuleContexts(OrNotContext.class);
		}
		public OrNotContext orNot(int i) {
			return getRuleContext(OrNotContext.class,i);
		}
		public OrConditionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_orCondition; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterOrCondition(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitOrCondition(this);
		}
	}

	public final OrConditionContext orCondition() throws RecognitionException {
		OrConditionContext _localctx = new OrConditionContext(_ctx, getState());
		enterRule(_localctx, 16, RULE_orCondition);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(135);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==NOT) {
				{
				setState(134);
				match(NOT);
				}
			}

			setState(137);
			andCondition();
			setState(143);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==OR) {
				{
				{
				setState(138);
				((OrConditionContext)_localctx).operator = orNot();
				setState(139);
				andCondition();
				}
				}
				setState(145);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AndConditionContext extends ParserRuleContext {
		public AndNotContext operator;
		public List<ConditionElementContext> conditionElement() {
			return getRuleContexts(ConditionElementContext.class);
		}
		public ConditionElementContext conditionElement(int i) {
			return getRuleContext(ConditionElementContext.class,i);
		}
		public List<AndNotContext> andNot() {
			return getRuleContexts(AndNotContext.class);
		}
		public AndNotContext andNot(int i) {
			return getRuleContext(AndNotContext.class,i);
		}
		public AndConditionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_andCondition; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterAndCondition(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitAndCondition(this);
		}
	}

	public final AndConditionContext andCondition() throws RecognitionException {
		AndConditionContext _localctx = new AndConditionContext(_ctx, getState());
		enterRule(_localctx, 18, RULE_andCondition);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(146);
			conditionElement();
			setState(152);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==AND) {
				{
				{
				setState(147);
				((AndConditionContext)_localctx).operator = andNot();
				setState(148);
				conditionElement();
				}
				}
				setState(154);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ConditionElementContext extends ParserRuleContext {
		public GroupConditionContext groupCondition() {
			return getRuleContext(GroupConditionContext.class,0);
		}
		public ConditionExprContext conditionExpr() {
			return getRuleContext(ConditionExprContext.class,0);
		}
		public ConditionElementContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_conditionElement; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterConditionElement(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitConditionElement(this);
		}
	}

	public final ConditionElementContext conditionElement() throws RecognitionException {
		ConditionElementContext _localctx = new ConditionElementContext(_ctx, getState());
		enterRule(_localctx, 20, RULE_conditionElement);
		try {
			setState(157);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case Brackets_L:
				enterOuterAlt(_localctx, 1);
				{
				setState(155);
				groupCondition();
				}
				break;
			case Phone_seach:
			case NAME:
				enterOuterAlt(_localctx, 2);
				{
				setState(156);
				conditionExpr();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class GroupConditionContext extends ParserRuleContext {
		public TerminalNode Brackets_L() { return getToken(BitQParser.Brackets_L, 0); }
		public OrConditionContext orCondition() {
			return getRuleContext(OrConditionContext.class,0);
		}
		public TerminalNode Brackets_R() { return getToken(BitQParser.Brackets_R, 0); }
		public GroupConditionContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_groupCondition; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterGroupCondition(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitGroupCondition(this);
		}
	}

	public final GroupConditionContext groupCondition() throws RecognitionException {
		GroupConditionContext _localctx = new GroupConditionContext(_ctx, getState());
		enterRule(_localctx, 22, RULE_groupCondition);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(159);
			match(Brackets_L);
			setState(160);
			orCondition();
			setState(161);
			match(Brackets_R);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ConditionExprContext extends ParserRuleContext {
		public Token op;
		public FullNameContext fullName() {
			return getRuleContext(FullNameContext.class,0);
		}
		public ValuesContext values() {
			return getRuleContext(ValuesContext.class,0);
		}
		public TerminalNode Contains() { return getToken(BitQParser.Contains, 0); }
		public TerminalNode PositionMatch() { return getToken(BitQParser.PositionMatch, 0); }
		public Phone_seachContext phone_seach() {
			return getRuleContext(Phone_seachContext.class,0);
		}
		public ConditionExprContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_conditionExpr; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterConditionExpr(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitConditionExpr(this);
		}
	}

	public final ConditionExprContext conditionExpr() throws RecognitionException {
		ConditionExprContext _localctx = new ConditionExprContext(_ctx, getState());
		enterRule(_localctx, 24, RULE_conditionExpr);
		int _la;
		try {
			setState(168);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case NAME:
				enterOuterAlt(_localctx, 1);
				{
				setState(163);
				fullName();
				setState(164);
				((ConditionExprContext)_localctx).op = _input.LT(1);
				_la = _input.LA(1);
				if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__1) | (1L << T__2) | (1L << T__3) | (1L << T__4) | (1L << T__5) | (1L << PositionMatch) | (1L << Contains))) != 0)) ) {
					((ConditionExprContext)_localctx).op = (Token)_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				setState(165);
				values();
				}
				break;
			case Phone_seach:
				enterOuterAlt(_localctx, 2);
				{
				setState(167);
				phone_seach();
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ValuesContext extends ParserRuleContext {
		public To_dateContext to_date() {
			return getRuleContext(To_dateContext.class,0);
		}
		public TerminalNode STRING() { return getToken(BitQParser.STRING, 0); }
		public TerminalNode NUM() { return getToken(BitQParser.NUM, 0); }
		public FullNameContext fullName() {
			return getRuleContext(FullNameContext.class,0);
		}
		public BoolTFContext boolTF() {
			return getRuleContext(BoolTFContext.class,0);
		}
		public TerminalNode TransArrt() { return getToken(BitQParser.TransArrt, 0); }
		public TerminalNode NULL() { return getToken(BitQParser.NULL, 0); }
		public ValuesContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_values; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterValues(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitValues(this);
		}
	}

	public final ValuesContext values() throws RecognitionException {
		ValuesContext _localctx = new ValuesContext(_ctx, getState());
		enterRule(_localctx, 26, RULE_values);
		try {
			setState(177);
			_errHandler.sync(this);
			switch (_input.LA(1)) {
			case TO_DATE:
				enterOuterAlt(_localctx, 1);
				{
				setState(170);
				to_date();
				}
				break;
			case STRING:
				enterOuterAlt(_localctx, 2);
				{
				setState(171);
				match(STRING);
				}
				break;
			case NUM:
				enterOuterAlt(_localctx, 3);
				{
				setState(172);
				match(NUM);
				}
				break;
			case NAME:
				enterOuterAlt(_localctx, 4);
				{
				setState(173);
				fullName();
				}
				break;
			case TRUE:
			case FALSE:
				enterOuterAlt(_localctx, 5);
				{
				setState(174);
				boolTF();
				}
				break;
			case TransArrt:
				enterOuterAlt(_localctx, 6);
				{
				setState(175);
				match(TransArrt);
				}
				break;
			case NULL:
				enterOuterAlt(_localctx, 7);
				{
				setState(176);
				match(NULL);
				}
				break;
			default:
				throw new NoViableAltException(this);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class To_dateContext extends ParserRuleContext {
		public TerminalNode TO_DATE() { return getToken(BitQParser.TO_DATE, 0); }
		public TerminalNode Brackets_L() { return getToken(BitQParser.Brackets_L, 0); }
		public List<TerminalNode> STRING() { return getTokens(BitQParser.STRING); }
		public TerminalNode STRING(int i) {
			return getToken(BitQParser.STRING, i);
		}
		public TerminalNode COMMA() { return getToken(BitQParser.COMMA, 0); }
		public TerminalNode Brackets_R() { return getToken(BitQParser.Brackets_R, 0); }
		public To_dateContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_to_date; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterTo_date(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitTo_date(this);
		}
	}

	public final To_dateContext to_date() throws RecognitionException {
		To_dateContext _localctx = new To_dateContext(_ctx, getState());
		enterRule(_localctx, 28, RULE_to_date);
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(179);
			match(TO_DATE);
			setState(180);
			match(Brackets_L);
			setState(181);
			match(STRING);
			setState(182);
			match(COMMA);
			setState(183);
			match(STRING);
			setState(184);
			match(Brackets_R);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class ResultContext extends ParserRuleContext {
		public List<FullNameContext> fullName() {
			return getRuleContexts(FullNameContext.class);
		}
		public FullNameContext fullName(int i) {
			return getRuleContext(FullNameContext.class,i);
		}
		public List<TerminalNode> COMMA() { return getTokens(BitQParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(BitQParser.COMMA, i);
		}
		public ResultContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_result; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterResult(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitResult(this);
		}
	}

	public final ResultContext result() throws RecognitionException {
		ResultContext _localctx = new ResultContext(_ctx, getState());
		enterRule(_localctx, 30, RULE_result);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(186);
			fullName();
			setState(191);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(187);
				match(COMMA);
				setState(188);
				fullName();
				}
				}
				setState(193);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class FullNameContext extends ParserRuleContext {
		public List<TerminalNode> NAME() { return getTokens(BitQParser.NAME); }
		public TerminalNode NAME(int i) {
			return getToken(BitQParser.NAME, i);
		}
		public List<TerminalNode> DOT() { return getTokens(BitQParser.DOT); }
		public TerminalNode DOT(int i) {
			return getToken(BitQParser.DOT, i);
		}
		public FullNameContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_fullName; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterFullName(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitFullName(this);
		}
	}

	public final FullNameContext fullName() throws RecognitionException {
		FullNameContext _localctx = new FullNameContext(_ctx, getState());
		enterRule(_localctx, 32, RULE_fullName);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(194);
			match(NAME);
			setState(199);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==DOT) {
				{
				{
				setState(195);
				match(DOT);
				setState(196);
				match(NAME);
				}
				}
				setState(201);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class BoolTFContext extends ParserRuleContext {
		public TerminalNode TRUE() { return getToken(BitQParser.TRUE, 0); }
		public TerminalNode FALSE() { return getToken(BitQParser.FALSE, 0); }
		public BoolTFContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_boolTF; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterBoolTF(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitBoolTF(this);
		}
	}

	public final BoolTFContext boolTF() throws RecognitionException {
		BoolTFContext _localctx = new BoolTFContext(_ctx, getState());
		enterRule(_localctx, 34, RULE_boolTF);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(202);
			_la = _input.LA(1);
			if ( !(_la==TRUE || _la==FALSE) ) {
			_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class OrNotContext extends ParserRuleContext {
		public TerminalNode OR() { return getToken(BitQParser.OR, 0); }
		public TerminalNode NOT() { return getToken(BitQParser.NOT, 0); }
		public OrNotContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_orNot; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterOrNot(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitOrNot(this);
		}
	}

	public final OrNotContext orNot() throws RecognitionException {
		OrNotContext _localctx = new OrNotContext(_ctx, getState());
		enterRule(_localctx, 36, RULE_orNot);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(204);
			match(OR);
			setState(206);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==NOT) {
				{
				setState(205);
				match(NOT);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class AndNotContext extends ParserRuleContext {
		public TerminalNode AND() { return getToken(BitQParser.AND, 0); }
		public TerminalNode NOT() { return getToken(BitQParser.NOT, 0); }
		public AndNotContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_andNot; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterAndNot(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitAndNot(this);
		}
	}

	public final AndNotContext andNot() throws RecognitionException {
		AndNotContext _localctx = new AndNotContext(_ctx, getState());
		enterRule(_localctx, 38, RULE_andNot);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(208);
			match(AND);
			setState(210);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==NOT) {
				{
				setState(209);
				match(NOT);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class Phone_seachContext extends ParserRuleContext {
		public Token op;
		public TerminalNode Phone_seach() { return getToken(BitQParser.Phone_seach, 0); }
		public TerminalNode Brackets_L() { return getToken(BitQParser.Brackets_L, 0); }
		public FullNameContext fullName() {
			return getRuleContext(FullNameContext.class,0);
		}
		public List<TerminalNode> COMMA() { return getTokens(BitQParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(BitQParser.COMMA, i);
		}
		public TerminalNode STRING() { return getToken(BitQParser.STRING, 0); }
		public TerminalNode Brackets_R() { return getToken(BitQParser.Brackets_R, 0); }
		public TerminalNode PositionMatch() { return getToken(BitQParser.PositionMatch, 0); }
		public TerminalNode Contains() { return getToken(BitQParser.Contains, 0); }
		public TerminalNode Has_Every_Char() { return getToken(BitQParser.Has_Every_Char, 0); }
		public Phone_seachContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_phone_seach; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterPhone_seach(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitPhone_seach(this);
		}
	}

	public final Phone_seachContext phone_seach() throws RecognitionException {
		Phone_seachContext _localctx = new Phone_seachContext(_ctx, getState());
		enterRule(_localctx, 40, RULE_phone_seach);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(212);
			match(Phone_seach);
			setState(213);
			match(Brackets_L);
			setState(214);
			fullName();
			setState(215);
			match(COMMA);
			setState(216);
			((Phone_seachContext)_localctx).op = _input.LT(1);
			_la = _input.LA(1);
			if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << PositionMatch) | (1L << Contains) | (1L << Has_Every_Char))) != 0)) ) {
				((Phone_seachContext)_localctx).op = (Token)_errHandler.recoverInline(this);
			}
			else {
				if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
				_errHandler.reportMatch(this);
				consume();
			}
			setState(217);
			match(COMMA);
			setState(218);
			match(STRING);
			setState(219);
			match(Brackets_R);
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class SortEContext extends ParserRuleContext {
		public FullNameContext fullName() {
			return getRuleContext(FullNameContext.class,0);
		}
		public TerminalNode STRING() { return getToken(BitQParser.STRING, 0); }
		public TerminalNode DESC() { return getToken(BitQParser.DESC, 0); }
		public TerminalNode ASC() { return getToken(BitQParser.ASC, 0); }
		public SortEContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_sortE; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterSortE(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitSortE(this);
		}
	}

	public final SortEContext sortE() throws RecognitionException {
		SortEContext _localctx = new SortEContext(_ctx, getState());
		enterRule(_localctx, 42, RULE_sortE);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(221);
			fullName();
			setState(225);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==T__6) {
				{
				setState(222);
				match(T__6);
				setState(223);
				match(STRING);
				setState(224);
				match(T__7);
				}
			}

			setState(228);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==DESC || _la==ASC) {
				{
				setState(227);
				_la = _input.LA(1);
				if ( !(_la==DESC || _la==ASC) ) {
				_errHandler.recoverInline(this);
				}
				else {
					if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
					_errHandler.reportMatch(this);
					consume();
				}
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class SortByContext extends ParserRuleContext {
		public TerminalNode Order() { return getToken(BitQParser.Order, 0); }
		public TerminalNode By() { return getToken(BitQParser.By, 0); }
		public List<SortEContext> sortE() {
			return getRuleContexts(SortEContext.class);
		}
		public SortEContext sortE(int i) {
			return getRuleContext(SortEContext.class,i);
		}
		public List<TerminalNode> COMMA() { return getTokens(BitQParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(BitQParser.COMMA, i);
		}
		public SortByContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_sortBy; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterSortBy(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitSortBy(this);
		}
	}

	public final SortByContext sortBy() throws RecognitionException {
		SortByContext _localctx = new SortByContext(_ctx, getState());
		enterRule(_localctx, 44, RULE_sortBy);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(230);
			match(Order);
			setState(231);
			match(By);
			setState(232);
			sortE();
			setState(237);
			_errHandler.sync(this);
			_la = _input.LA(1);
			while (_la==COMMA) {
				{
				{
				setState(233);
				match(COMMA);
				setState(234);
				sortE();
				}
				}
				setState(239);
				_errHandler.sync(this);
				_la = _input.LA(1);
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class LimitContext extends ParserRuleContext {
		public TerminalNode LIMIT() { return getToken(BitQParser.LIMIT, 0); }
		public List<TerminalNode> NUM() { return getTokens(BitQParser.NUM); }
		public TerminalNode NUM(int i) {
			return getToken(BitQParser.NUM, i);
		}
		public TerminalNode COMMA() { return getToken(BitQParser.COMMA, 0); }
		public LimitContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_limit; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterLimit(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitLimit(this);
		}
	}

	public final LimitContext limit() throws RecognitionException {
		LimitContext _localctx = new LimitContext(_ctx, getState());
		enterRule(_localctx, 46, RULE_limit);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(240);
			match(LIMIT);
			setState(241);
			match(NUM);
			setState(244);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==COMMA) {
				{
				setState(242);
				match(COMMA);
				setState(243);
				match(NUM);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static class MixContext extends ParserRuleContext {
		public TerminalNode MIX() { return getToken(BitQParser.MIX, 0); }
		public FullNameContext fullName() {
			return getRuleContext(FullNameContext.class,0);
		}
		public List<TerminalNode> NUM() { return getTokens(BitQParser.NUM); }
		public TerminalNode NUM(int i) {
			return getToken(BitQParser.NUM, i);
		}
		public List<TerminalNode> COMMA() { return getTokens(BitQParser.COMMA); }
		public TerminalNode COMMA(int i) {
			return getToken(BitQParser.COMMA, i);
		}
		public MixContext(ParserRuleContext parent, int invokingState) {
			super(parent, invokingState);
		}
		@Override public int getRuleIndex() { return RULE_mix; }
		@Override
		public void enterRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).enterMix(this);
		}
		@Override
		public void exitRule(ParseTreeListener listener) {
			if ( listener instanceof BitQListener ) ((BitQListener)listener).exitMix(this);
		}
	}

	public final MixContext mix() throws RecognitionException {
		MixContext _localctx = new MixContext(_ctx, getState());
		enterRule(_localctx, 48, RULE_mix);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(246);
			match(MIX);
			setState(247);
			fullName();
			setState(258);
			_errHandler.sync(this);
			_la = _input.LA(1);
			if (_la==T__6) {
				{
				setState(248);
				match(T__6);
				setState(249);
				match(NUM);
				setState(254);
				_errHandler.sync(this);
				_la = _input.LA(1);
				while (_la==COMMA) {
					{
					{
					setState(250);
					match(COMMA);
					setState(251);
					match(NUM);
					}
					}
					setState(256);
					_errHandler.sync(this);
					_la = _input.LA(1);
				}
				setState(257);
				match(T__7);
				}
			}

			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}

	public static final String _serializedATN =
		"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\63\u0107\4\2\t\2"+
		"\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
		"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
		"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
		"\4\32\t\32\3\2\3\2\5\2\67\n\2\3\3\3\3\3\3\3\3\5\3=\n\3\3\3\3\3\3\3\3\3"+
		"\3\3\7\3D\n\3\f\3\16\3G\13\3\3\3\3\3\3\4\3\4\3\4\3\4\7\4O\n\4\f\4\16\4"+
		"R\13\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\5\5\\\n\5\3\5\5\5_\n\5\3\5\5\5"+
		"b\n\5\3\5\5\5e\n\5\3\5\5\5h\n\5\3\5\5\5k\n\5\3\6\3\6\3\6\7\6p\n\6\f\6"+
		"\16\6s\13\6\3\7\3\7\3\7\3\7\3\b\3\b\5\b{\n\b\3\t\3\t\3\t\3\t\3\t\3\t\3"+
		"\t\7\t\u0084\n\t\f\t\16\t\u0087\13\t\3\n\5\n\u008a\n\n\3\n\3\n\3\n\3\n"+
		"\7\n\u0090\n\n\f\n\16\n\u0093\13\n\3\13\3\13\3\13\3\13\7\13\u0099\n\13"+
		"\f\13\16\13\u009c\13\13\3\f\3\f\5\f\u00a0\n\f\3\r\3\r\3\r\3\r\3\16\3\16"+
		"\3\16\3\16\3\16\5\16\u00ab\n\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\5\17"+
		"\u00b4\n\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\7\21\u00c0"+
		"\n\21\f\21\16\21\u00c3\13\21\3\22\3\22\3\22\7\22\u00c8\n\22\f\22\16\22"+
		"\u00cb\13\22\3\23\3\23\3\24\3\24\5\24\u00d1\n\24\3\25\3\25\5\25\u00d5"+
		"\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27"+
		"\5\27\u00e4\n\27\3\27\5\27\u00e7\n\27\3\30\3\30\3\30\3\30\3\30\7\30\u00ee"+
		"\n\30\f\30\16\30\u00f1\13\30\3\31\3\31\3\31\3\31\5\31\u00f7\n\31\3\32"+
		"\3\32\3\32\3\32\3\32\3\32\7\32\u00ff\n\32\f\32\16\32\u0102\13\32\3\32"+
		"\5\32\u0105\n\32\3\32\2\2\33\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \""+
		"$&(*,.\60\62\2\7\3\2\35\36\4\2\3\b\26\27\3\2\60\61\3\2\26\30\3\2\23\24"+
		"\2\u010f\2\66\3\2\2\2\48\3\2\2\2\6J\3\2\2\2\bU\3\2\2\2\nl\3\2\2\2\ft\3"+
		"\2\2\2\16z\3\2\2\2\20|\3\2\2\2\22\u0089\3\2\2\2\24\u0094\3\2\2\2\26\u009f"+
		"\3\2\2\2\30\u00a1\3\2\2\2\32\u00aa\3\2\2\2\34\u00b3\3\2\2\2\36\u00b5\3"+
		"\2\2\2 \u00bc\3\2\2\2\"\u00c4\3\2\2\2$\u00cc\3\2\2\2&\u00ce\3\2\2\2(\u00d2"+
		"\3\2\2\2*\u00d6\3\2\2\2,\u00df\3\2\2\2.\u00e8\3\2\2\2\60\u00f2\3\2\2\2"+
		"\62\u00f8\3\2\2\2\64\67\5\b\5\2\65\67\5\4\3\2\66\64\3\2\2\2\66\65\3\2"+
		"\2\2\67\3\3\2\2\289\7\r\2\29:\7\16\2\2:<\5\"\22\2;=\5\6\4\2<;\3\2\2\2"+
		"<=\3\2\2\2=>\3\2\2\2>?\7\17\2\2?@\7,\2\2@E\5\34\17\2AB\7%\2\2BD\5\34\17"+
		"\2CA\3\2\2\2DG\3\2\2\2EC\3\2\2\2EF\3\2\2\2FH\3\2\2\2GE\3\2\2\2HI\7-\2"+
		"\2I\5\3\2\2\2JK\7,\2\2KP\5\"\22\2LM\7%\2\2MO\5\"\22\2NL\3\2\2\2OR\3\2"+
		"\2\2PN\3\2\2\2PQ\3\2\2\2QS\3\2\2\2RP\3\2\2\2ST\7-\2\2T\7\3\2\2\2UV\7\31"+
		"\2\2VW\5 \21\2WX\7\32\2\2X[\5\n\6\2YZ\7\33\2\2Z\\\5\22\n\2[Y\3\2\2\2["+
		"\\\3\2\2\2\\^\3\2\2\2]_\5.\30\2^]\3\2\2\2^_\3\2\2\2_a\3\2\2\2`b\5\62\32"+
		"\2a`\3\2\2\2ab\3\2\2\2bd\3\2\2\2ce\5\60\31\2dc\3\2\2\2de\3\2\2\2eg\3\2"+
		"\2\2fh\5\f\7\2gf\3\2\2\2gh\3\2\2\2hj\3\2\2\2ik\7&\2\2ji\3\2\2\2jk\3\2"+
		"\2\2k\t\3\2\2\2lq\5\"\22\2mn\7%\2\2np\5\"\22\2om\3\2\2\2ps\3\2\2\2qo\3"+
		"\2\2\2qr\3\2\2\2r\13\3\2\2\2sq\3\2\2\2tu\7\20\2\2uv\7\21\2\2vw\7.\2\2"+
		"w\r\3\2\2\2x{\5\20\t\2y{\5\"\22\2zx\3\2\2\2zy\3\2\2\2{\17\3\2\2\2|\u0085"+
		"\5\"\22\2}~\t\2\2\2~\177\7\37\2\2\177\u0080\5\"\22\2\u0080\u0081\7\34"+
		"\2\2\u0081\u0082\5\22\n\2\u0082\u0084\3\2\2\2\u0083}\3\2\2\2\u0084\u0087"+
		"\3\2\2\2\u0085\u0083\3\2\2\2\u0085\u0086\3\2\2\2\u0086\21\3\2\2\2\u0087"+
		"\u0085\3\2\2\2\u0088\u008a\7\"\2\2\u0089\u0088\3\2\2\2\u0089\u008a\3\2"+
		"\2\2\u008a\u008b\3\2\2\2\u008b\u0091\5\24\13\2\u008c\u008d\5&\24\2\u008d"+
		"\u008e\5\24\13\2\u008e\u0090\3\2\2\2\u008f\u008c\3\2\2\2\u0090\u0093\3"+
		"\2\2\2\u0091\u008f\3\2\2\2\u0091\u0092\3\2\2\2\u0092\23\3\2\2\2\u0093"+
		"\u0091\3\2\2\2\u0094\u009a\5\26\f\2\u0095\u0096\5(\25\2\u0096\u0097\5"+
		"\26\f\2\u0097\u0099\3\2\2\2\u0098\u0095\3\2\2\2\u0099\u009c\3\2\2\2\u009a"+
		"\u0098\3\2\2\2\u009a\u009b\3\2\2\2\u009b\25\3\2\2\2\u009c\u009a\3\2\2"+
		"\2\u009d\u00a0\5\30\r\2\u009e\u00a0\5\32\16\2\u009f\u009d\3\2\2\2\u009f"+
		"\u009e\3\2\2\2\u00a0\27\3\2\2\2\u00a1\u00a2\7,\2\2\u00a2\u00a3\5\22\n"+
		"\2\u00a3\u00a4\7-\2\2\u00a4\31\3\2\2\2\u00a5\u00a6\5\"\22\2\u00a6\u00a7"+
		"\t\3\2\2\u00a7\u00a8\5\34\17\2\u00a8\u00ab\3\2\2\2\u00a9\u00ab\5*\26\2"+
		"\u00aa\u00a5\3\2\2\2\u00aa\u00a9\3\2\2\2\u00ab\33\3\2\2\2\u00ac\u00b4"+
		"\5\36\20\2\u00ad\u00b4\7.\2\2\u00ae\u00b4\7/\2\2\u00af\u00b4\5\"\22\2"+
		"\u00b0\u00b4\5$\23\2\u00b1\u00b4\7\13\2\2\u00b2\u00b4\7\f\2\2\u00b3\u00ac"+
		"\3\2\2\2\u00b3\u00ad\3\2\2\2\u00b3\u00ae\3\2\2\2\u00b3\u00af\3\2\2\2\u00b3"+
		"\u00b0\3\2\2\2\u00b3\u00b1\3\2\2\2\u00b3\u00b2\3\2\2\2\u00b4\35\3\2\2"+
		"\2\u00b5\u00b6\7#\2\2\u00b6\u00b7\7,\2\2\u00b7\u00b8\7.\2\2\u00b8\u00b9"+
		"\7%\2\2\u00b9\u00ba\7.\2\2\u00ba\u00bb\7-\2\2\u00bb\37\3\2\2\2\u00bc\u00c1"+
		"\5\"\22\2\u00bd\u00be\7%\2\2\u00be\u00c0\5\"\22\2\u00bf\u00bd\3\2\2\2"+
		"\u00c0\u00c3\3\2\2\2\u00c1\u00bf\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2!\3"+
		"\2\2\2\u00c3\u00c1\3\2\2\2\u00c4\u00c9\7*\2\2\u00c5\u00c6\7+\2\2\u00c6"+
		"\u00c8\7*\2\2\u00c7\u00c5\3\2\2\2\u00c8\u00cb\3\2\2\2\u00c9\u00c7\3\2"+
		"\2\2\u00c9\u00ca\3\2\2\2\u00ca#\3\2\2\2\u00cb\u00c9\3\2\2\2\u00cc\u00cd"+
		"\t\4\2\2\u00cd%\3\2\2\2\u00ce\u00d0\7!\2\2\u00cf\u00d1\7\"\2\2\u00d0\u00cf"+
		"\3\2\2\2\u00d0\u00d1\3\2\2\2\u00d1\'\3\2\2\2\u00d2\u00d4\7 \2\2\u00d3"+
		"\u00d5\7\"\2\2\u00d4\u00d3\3\2\2\2\u00d4\u00d5\3\2\2\2\u00d5)\3\2\2\2"+
		"\u00d6\u00d7\7\25\2\2\u00d7\u00d8\7,\2\2\u00d8\u00d9\5\"\22\2\u00d9\u00da"+
		"\7%\2\2\u00da\u00db\t\5\2\2\u00db\u00dc\7%\2\2\u00dc\u00dd\7.\2\2\u00dd"+
		"\u00de\7-\2\2\u00de+\3\2\2\2\u00df\u00e3\5\"\22\2\u00e0\u00e1\7\t\2\2"+
		"\u00e1\u00e2\7.\2\2\u00e2\u00e4\7\n\2\2\u00e3\u00e0\3\2\2\2\u00e3\u00e4"+
		"\3\2\2\2\u00e4\u00e6\3\2\2\2\u00e5\u00e7\t\6\2\2\u00e6\u00e5\3\2\2\2\u00e6"+
		"\u00e7\3\2\2\2\u00e7-\3\2\2\2\u00e8\u00e9\7(\2\2\u00e9\u00ea\7)\2\2\u00ea"+
		"\u00ef\5,\27\2\u00eb\u00ec\7%\2\2\u00ec\u00ee\5,\27\2\u00ed\u00eb\3\2"+
		"\2\2\u00ee\u00f1\3\2\2\2\u00ef\u00ed\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0"+
		"/\3\2\2\2\u00f1\u00ef\3\2\2\2\u00f2\u00f3\7\'\2\2\u00f3\u00f6\7/\2\2\u00f4"+
		"\u00f5\7%\2\2\u00f5\u00f7\7/\2\2\u00f6\u00f4\3\2\2\2\u00f6\u00f7\3\2\2"+
		"\2\u00f7\61\3\2\2\2\u00f8\u00f9\7\22\2\2\u00f9\u0104\5\"\22\2\u00fa\u00fb"+
		"\7\t\2\2\u00fb\u0100\7/\2\2\u00fc\u00fd\7%\2\2\u00fd\u00ff\7/\2\2\u00fe"+
		"\u00fc\3\2\2\2\u00ff\u0102\3\2\2\2\u0100\u00fe\3\2\2\2\u0100\u0101\3\2"+
		"\2\2\u0101\u0103\3\2\2\2\u0102\u0100\3\2\2\2\u0103\u0105\7\n\2\2\u0104"+
		"\u00fa\3\2\2\2\u0104\u0105\3\2\2\2\u0105\63\3\2\2\2\37\66<EP[^adgjqz\u0085"+
		"\u0089\u0091\u009a\u009f\u00aa\u00b3\u00c1\u00c9\u00d0\u00d4\u00e3\u00e6"+
		"\u00ef\u00f6\u0100\u0104";
	public static final ATN _ATN =
		new ATNDeserializer().deserialize(_serializedATN.toCharArray());
	static {
		_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
		for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
			_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
		}
	}
}